//函数原型通常会隐藏在include文件中
//本程序中使用了cheer()和cube()函数.留意其中的函数原型.
#include<iostream>
void cheers(int);
double cube(double x);
int main()
{
    setlocale(LC_ALL, "zh_CN.UTF-8");
    using namespace std;
    cheers(5);
    cout << "Give me a number: ";
    double side;
    cin>>side;
    double volume = cube(side);
    cout << "A"<<side<<"-foot cube has a volume of ";
    cout <<volume << " cubic feet.\n";
    cheers(cube(2));
    return 0;
}

void cheers(int n)
{
    using namespace std;
    for(int i = 0; i < n ; i++)
        cout <<"Cheers! ";
    cout << endl;
}

double cube(double x)
{
    return x*x*x;
}
